package com.kingmed.kmss.bpmn.modules.backup.controller;


import java.util.List;

import com.kingmed.kmss.bpmn.modules.backup.service.BizApprovalTrailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.kingmed.kmss.common.dto.bpmn.BizApprovalTrailDTO;
import com.kingmed.kmss.common.qc.bpmn.ApprovalTrailQC;
import com.kingmed.kmss.common.vo.CommonResponse;
import com.kingmed.kmss.common.vo.CommonResponseHelper;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
 * 审批跟踪 控制器
 * </p>
 */
@RestController
@RequestMapping("/ext")
@Api(tags = "bpmn-审批跟踪")
public class ApprovalTrailController {

    @Autowired
    private BizApprovalTrailService trailSvc;


    /**
     * 前端用到，审批跟踪记录history
     * @param qc
     * @return
     */
    @ApiOperation("审批跟踪")
    @PostMapping(value = "/process/trail")
    public CommonResponse<List<BizApprovalTrailDTO>> approvalTrail(@RequestBody ApprovalTrailQC qc) {
    	
        return CommonResponseHelper.success(trailSvc.queryApprovalTrail(qc));
    }

  
}
